<?php

/**
  *
  * Copyright 2010 Universal Web Frameworks Project
  * Universal Security Platform API
  * 
  * Developed By : Mike Schmidt
  * Date Created : Jan , 17 , 2010
  * 
  */  

/**
  *
  * Required Platform Library Files
  * 
  * 1. Main Controls
  * 2. Apps Controls
  * 3. User Controls
  * 4. Site Controls
  * 5. Link Controls
  * 6. Main Settings
  * 
  */

include "lib/main.php";
include "lib/apps.php";
include "lib/user.php";
include "lib/site.php";
include "lib/link.php";


/**
  *
  * Master Universal Security Platform API Class
  * Version 1.00 Beta 1 
  * 
  */
    
class MyWebFrameworks_API {

     
    // Master Platform Settings
    public $domain;             
    public $webssl;
    public $typeid;
   
    // Current Platform Request
	public $query;
	public $myapp;
    public $mycmd;
   
    // Current Account Request
    public $user;
    public $pass;
    public $keys; 
    
    // Requested Platform Layer
    public $run;
    
    
    /**
      *
	  * Start The Platform -> Core 1
	  * Basic Platform Usage Setting
	  *  
	  */  
	 
	  function start($run){
		
		
		 /**
		   * 
		   * Basic Platform Usage Information
		   * 
		   * By using the basic single layer system
		   * compaired to the advanced method below
		   * you are only able to execute one layer
		   * at a time. Also this method only string
		   * of information, the variable is called
		   * $run and it is a multi piece string.
		   * 
		   * Example -> $run = Layer_Name:Other_Info
		   * 
		   */    
		   
		   // Explode The Current Information
		   $list = explode(":",$run,"2");
		   
		   // Rename The Split Information
		   $layer = $list[0];
		   $other = $list[1];
		   
		   
		 /**
		   *
		   * Validate The Requested Layer ID 
		   * 
		   */    
		   
		   // Passed Layer Validation
		   if(layercheck($layer) === "found"){
			
			  
			  /**
			    *
				* Run The Requested Layer With Commands
				* 
				*/   
			    
			    RunLayer($layer,$other);
			    
			     
		   }
		   
		   // Error Detected -> Layer Validation
		   else{
		     
		     
			 // Error Settings
			 $error = layercheck($layer);
			 echo $error;
			 
			 	
		   }
		   
		   
	  }
	  
	  
	/**
	  *
	  * Start The Platform -> Core 2
	  * Advanced Platform Usage API
	  * 
	  */
	  
	  function myapi($domain,$webssl,$typeid,$query,$myapp,$mycmd,$user,$pass,$keys){
		
		
		 /**
		   *
		   * Advanced Platform Usage Information
		   * 
		   * The advanced method allows developers to
		   * intergrate this platform into their projects
		   * or web site to give their current solution more
		   * usability or general functions. 
		   * 
		   * 1. Domain -> Domain Name
		   * 2. WebSSL -> Domain SSL
		   * 3. TypeID -> Return Type
		   * 4. Query  -> Current Query
		   * 5. MyApp  -> App Request
		   * 6. MyCMD  -> Cmd Request
		   * 7. User   -> User Name
		   * 8. Pass   -> User Password
		   * 9. Keys   -> Security Keys
		   * 
		   * These extra options are used for most of the advanced features
		   * of this platform. The main option for this method is the third
		   * option or the return type. This allow developers to customize
		   * the information that is being returned to them via the following
		   * options,
		   * 
		   * Return Options -> Version 1.0
		   * 
		   * A. XML    
		   * B. HTML   
		   * C. Text   
		   * D. Array
		   * 
		   */  
		
		   
		     
		
	  }

	      
}

?>